<?php

class CustomersController extends AppController {

    var $name = 'Customers';

    var $uses = array('SiteCostCenter');

    var $viewPath = 'customers/customers';

    function popup_site_cost_center_view() {
        $this->layout = 'popup';
        // clear session การ search จากครั้งก่อน
        $this->Session->delete($this->name);

        $this->set('popupTitle', 'Select Cost Center');
        $this->set('popupWidth', '600');
    }

    function popup_site_cost_center_paginate() {
        if (!isset($this->data['limit'])) {
            $this->data['limit'] = 10;
        }
        parent::display('SiteCostCenter');
        $this->data['SiteCostCenter']['site_id'] = $this->Auth->user('site_id');
        $op = array(
            'name' => 'LIKE',
            'site_id' => '='
        );
        $this->_paging('SiteCostCenter', $op);
    }

}

?>
